using CosyTrade.Futures;
using System.Collections.Generic;
using NHibernate.Expression;
using System;
using CosyTrade.Store;
namespace CosyTrade
{
    public interface IFuturesManager
    {
        void CreateFuturesOrder(FuturesOrder order);
        void UpdateFuturesOrder(FuturesOrder order);
        void UpdateOrderAndItChilds(FuturesOrder order);

        void UpdateWares(Guid orderId , OrderFormWares wares );
        void UpdatePayInfo(Guid orderId, PayInfo info);
        void UpdateDelayInfo(Guid order, DelayPay delayPay);

        void DeletePayinfo(Guid infoId);
        void DeleteOrderWares(Guid waresid);
        void DeleteDelayinfo(Guid delayid);
        void DeleteFuturesOrder(Guid orderId);

        IList<FuturesOrder> GetFuturesOrders(ICriterion criterion);
        IList<FuturesOrder> GetFuturesOrders(int pageIndex, int pageSize,ICriterion criterion,Order[] orderby);
        IList<OrderFormWares> GetFormWares(Guid orderId);
        IList<PayInfo> GetPayInfos(Guid orderId);
        IList<DelayPay> GetDelays(Guid orderId);

        FuturesOrder GetFuturesOrder(Guid primarykey);
        OrderFormWares GetOrderFormWares(Guid primarykey);
        PayInfo GetPayInfo(Guid primarykey);
        DelayPay GetDelayPayInfo(Guid primarykey);

        IList<Product> GetProductList(ICriterion criterion);
    }
}